import java.util.ArrayList;

import jpcap.JpcapCaptor;
import jpcap.NetworkInterface;
import jpcap.PacketReceiver;
import jpcap.packet.Packet;


public class PacketStorage implements PacketReceiver
{
   public ArrayList<Packet> packets = new ArrayList<Packet>();
   
   public void receivePacket(Packet p)
   {
      packets.add(p);
      System.out.println(packets);
   }
   public Packet getPacket()
   {
      return packets.size()>0?packets.remove(0):null;
   }
}
